package com.myweb.provider.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.myweb.facade.pojo.Product;
import com.myweb.facade.service.ProductService;
import com.myweb.provider.mapper.ProductMapper;

@Service
@Transactional
//@com.alibaba.dubbo.config.annotation.Service(interfaceClass=com.myweb.api.service.ProductService.class, protocol = {"rest", "dubbo"})
public class ProductServiceImpl implements ProductService{
	
	@Autowired
	private ProductMapper ProductMapper;
//http:localhost:8888/myweb-shop-provider/ProductServiceImpl/getProductName
	public String getProductName() {
		return "恭喜你，获得了产品名称！";
	}

	@Override
	public void testSql() {
		Product p=new Product();
		p.setName("zzzha");
		ProductMapper.insert(p);
	}
  
}
